<?php


namespace App\Helper;


class ErrorCode
{
    /**
     * 基本错误码 1～1000
     */
    const AUTH_ERROR = 401;
    const NO_PERMISSION_PROCESS = 402;
    const NO_DATA_AVAILABLE = 403;
    const MODEL_UPDATED_FAIL = 405;

    /**
     * 调查问卷错误吗 2000~2999
     */
    const PAPER_NOT_FOUND = 2001;


    /**
     * 用户错误码 3000～3999
     */
    const
        USER_NOT_FOUND = 3001,
        USER_ID_INVALID = 3002;


    public static $errorMessages = [


        self::AUTH_ERROR => 'Authorization has been denied for this request !',
        self::NO_PERMISSION_PROCESS => 'No permission to process !',
        self::NO_DATA_AVAILABLE => 'No data available !',
        self::MODEL_UPDATED_FAIL => 'database updated failed',

        self::PAPER_NOT_FOUND => '找不到该问卷',

        self::USER_NOT_FOUND => 'User not found!',
        self::USER_ID_INVALID => 'The user id is invalid !',
    ];
}
